<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:82:"D:\xampp\htdocs\thinkphp5_home\public/../application/admin\view\article\index.html";i:1478136326;s:79:"D:\xampp\htdocs\thinkphp5_home\public/../application/admin\view\public\top.html";i:1478238073;s:80:"D:\xampp\htdocs\thinkphp5_home\public/../application/admin\view\public\left.html";i:1478241712;}*/ ?>
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/admin/css/common.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/admin/css/main.css" />
    <script type="text/javascript" src="__PUBLIC__/static/admin/js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/jquery/2.2.4/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/dialog/layer.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/dialog.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/admin/js/list.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/admin/js/checkAll.js"></script>
</head>
<body>
<!--页面顶部导航模块-->
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a href="<?php echo url('../index/Index/index'); ?>">首页</a></li>
                <li><a href="<?php echo url('Index/index'); ?>" target="_blank" class="on" >后台</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
            
                <li><a href="#">
                <?php 
                switch (session('user_type')){
                  case 9:
                    $username = '订阅用户';
                    break;
                  case 1:
                    $username = '投稿者';
                    break;
                  case 2:
                    $username = '系统作者';
                    break;
                  case 3:
                    $username = '系统编辑';
                    break;
                  case 4:
                    $username = '系统管理员';
                    break;
                  default:
                    $username = '未知身份';
                }
                echo (session('user_name')." | ".$username); ?>
                </a></li>
                <li><a href="<?php echo url('User/edit',array('id'=>session('user_id'))); ?>">修改密码</a></li>
                <li><a href="<?php echo url('Login/logout'); ?>">退出</a></li>
            </ul>
        </div>
    </div>
</div>

<div class="container clearfix">
	<!--页面左侧导航模块-->
	<div class="sidebar-wrap">
	<div class="sidebar-title">
		<h1>菜单</h1>
	</div>
  <?php $USER_TYPE=$_SESSION['think']['user_type']; ?>
	<div class="sidebar-content">
		<ul class="sidebar-list">
			<li>
				<a href="#"><i class="icon-font">&#xe003;</i>常用操作</a>
        
				<ul class="sub-menu">
          <!--0订阅者 1投稿者 2作者 3编辑 4管理员-->
          
					<?php if(($USER_TYPE > 2)): ?><li><a href="<?php echo url('Category/index'); ?>"><i class="icon-font">&#xe008;</i>栏目管理</a></li><?php endif; if(($USER_TYPE > 0)): ?><li><a href="<?php echo url('Article/index'); ?>"><i class="icon-font">&#xe005;</i>文章管理</a></li><?php endif; if(($USER_TYPE > 2)): ?><li><a href="<?php echo url('Page/index'); ?>"><i class="icon-font">&#xe012;</i>页面管理</a></li><?php endif; if(($USER_TYPE > 2)): ?><li><a href="<?php echo url('Link/index'); ?>"><i class="icon-font">&#xe052;</i>友情链接</a></li><?php endif; if(($USER_TYPE > 2)): ?><li><a href="design.html"><i class="icon-font">&#xe004;</i>留言管理</a></li><?php endif; if(($USER_TYPE > 2)): ?><li><a href="design.html"><i class="icon-font">&#xe033;</i>广告管理</a></li><?php endif; if(($USER_TYPE > 3)): ?><li><a href="<?php echo url('User/index'); ?>"><i class="icon-font">&#xe014;</i>用户管理</a></li><?php endif; ?>
				</ul>
			</li>
			<li>
				<?php if(($USER_TYPE > 3)): ?><a href="#"><i class="icon-font">&#xe018;</i>系统管理</a><?php endif; ?>
				<ul class="sub-menu">
					<?php if(($USER_TYPE > 3)): ?><li><a href="<?php echo url('Config/siteinfo'); ?>"><i class="icon-font">&#xe044;</i>网站信息</a></li><?php endif; ?>
					<!--li><a href="<?php echo url('Config/clist'); ?>"><i class="icon-font">&#xe017;</i>系统配置</a></li>
					<li><a href="<?php echo url('Config/index'); ?>"><i class="icon-font">&#xe003;</i>配置管理</a></li-->
					<?php if(($USER_TYPE > 3)): ?><li><a href="system.html"><i class="icon-font">&#xe037;</i>清理缓存</a></li><?php endif; if(($USER_TYPE > 3)): ?><li><a href="system.html"><i class="icon-font">&#xe016;</i>数据备份</a></li><?php endif; if(($USER_TYPE > 3)): ?><li><a href="system.html"><i class="icon-font">&#xe045;</i>数据还原</a></li><?php endif; ?>
				</ul>
			</li>
		</ul>
	</div>
</div>

    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?php echo url('Index/index'); ?>">后台</a><span class="crumb-step">&gt;</span><span class="crumb-name">文章管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="query" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="120">文章分类:</th>
                            <td>
                                <?php echo $CATEGORY_MENU; ?>
                            </td>
                            <th width="120">标题关键字:</th>
                            <td><input class="common-text-thin" placeholder="关键字" name="keywords" id="" type="text" value = <?php echo (isset($KEYWORDS) && ($KEYWORDS !== '')?$KEYWORDS:''); ?> ></td>
                            <td><input class="btn btn-primary btn2 btn-sm" id="queryBtn" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post" action="batch_delete">
                <div class="result-title">
                    <div class="result-list">
                        <a href="<?php echo url('article/insert'); ?>"><i class="icon-font"></i>新增文章</a>
                        <a id="batchDel" href="javascript:void(0)" onclick="document:myform.submit();"><i class="icon-font"></i>批量删除</a>
                        <!--<a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>-->
                    </div>
                </div>
                <div class="result-content">
                    

                      <table class="result-tab" id="article_list" width="100%">
                          <tr>
                              <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox" onclick="checkAll(this, 'article_list', 'article_item');"></th>
                              <th width="5%">ID</th>
                              <th >标题</th>
                              <th width="10%">栏目</th>
                              <!--th width="6%">作者</th-->
                              <th width="6%">缩略图</th>
                              <th width="6%">状态</th>
                              <th width="6%">推荐</th>
                              <th width="13%">创建时间</th>
                              <!--<th width="13%">更新时间</th>-->
                              <th width="10%">操作</th>
                          </tr>
                          <?php if(is_array($ARTICLES) || $ARTICLES instanceof \think\Collection): $i = 0; $__LIST__ = $ARTICLES;if( count($__LIST__)==0 ) : echo "暂时没有数据" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>
                          <tr>
                              <td class="tc"><input class="article_item" name="id[]" value="<?php echo $data['id']; ?>" type="checkbox"></td>
                              <td><?php echo $data['id']; ?></td>
                              <td title=<?php echo $data['title']; ?>><?php echo $data['title']; ?></td>
                              <td title=<?php echo $data['category']; ?>><?php echo $data['category']; ?></td>
                              <!--td title=<?php echo $data['author']; ?>><?php echo $data['author']; ?></td-->
                              <td>
                              <?php if($data['thumbnail'] != ''): ?> <img src="__PUBLIC__<?php echo $data['thumbnail']; ?>" height="40">
                              <?php else: ?> 暂无
                              <?php endif; ?>
                              </td>
                              <td title=<?php echo $data['status']; ?>>
                                <?php switch($data['status']): case "0": ?>待审核<?php break; case "1": ?>已发布<?php break; endswitch; ?>
                              </td>
                              <td title=<?php echo $data['isfeature']; ?>>
                                <?php switch($data['isfeature']): case "0": ?>否<?php break; case "1": ?>是<?php break; endswitch; ?>
                              </td>
                              <td title=<?php echo $data['create_time']; ?>><?php echo $data['create_time']; ?></td>
                              <!--<td title=<?php echo $data['update_time']; ?>><?php echo $data['update_time']; ?></td>-->
                              <td>
                                  <a class="link-update" href="<?php echo url('edit',array('id'=>$data['id'])); ?>">修改</a> |
                                  <a class="link-del" id="link-del" attr-id="<?php echo $data['id']; ?>" attr-message="确定删除该文章?" href="javascript:void(0)" >删除</a>
                              </td>
                          </tr>
                          <?php endforeach; endif; else: echo "暂时没有数据" ;endif; ?>
                      </table>
                      <div class="list-page">
                        <?php if(empty($ARTICLES) != true): ?> <?php echo $ARTICLES->render(); endif; ?>
                      </div>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>